package MiArbol;


import org.antlr.runtime.RecognitionException;
import org.antlr.runtime.Token;

import org.antlr.runtime.TokenStream;
import org.antlr.runtime.tree.CommonTreeAdaptor;

import antlr.CommonAST;


public class MiArbolAdaptor extends CommonTreeAdaptor {

@Override 
public Object create(Token payload)
{	
	if(payload == null) { 
		return null; 
	}
//	System.out.println ("llega token adaptor" + payload.toString().toString());
	return new MiArbol (payload);
}

@Override 
public Object dupNode(Object t) { 
  if(t == null) { 
    return null; 
  } 
 // System.out.println ("llega arbol adaptor"+ t.toString());
  return create(((MiArbol)t).token); 
} 

@Override 
public Object errorNode(TokenStream input, Token start, Token stop, 
RecognitionException e) { 
  return null; 
} 

}